﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Newtonsoft.Json;

namespace YY.Web.MyAgent
{
    public partial class ServiceMoney : BaseFunction.LoginHelp
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitData();
            }
        }
        private void InitData()
        {
            string sql = "SELECT  * FROM  dbo.tb_SystemConfig WHERE configkey = 'servicemoney'";
            DataSet ds_installationcost = BaseFunction.MsSql2008.Query(sql);
            string jsonData = ds_installationcost.Tables[0].Rows[0]["ConfigValue"] + "";
            List<ServiceHelper> InstallationLists = JsonConvert.DeserializeObject<List<ServiceHelper>>(jsonData);
            rpt_servicemoney.DataSource = InstallationLists;
            rpt_servicemoney.DataBind();
        }

        public class ServiceHelper
        {
            public string systemname { get; set; }
            public string money { get; set; }
            public string share { get; set; }
        }
    }
}